#define _CRT_SECURE_NO_WARNINGS 1

#include<stdio.h>

int main()
{
	int seconds=0;
	scanf("%d", &seconds);
	int b = seconds/3600;
	int c = seconds%3600-seconds%60;
	int d = seconds%60;
	printf("%d%d%d", b, c, d);
	return 0;


}
